From 12d39540c8c0b6cd70de3fc90d12fe4fd1834360 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 7 May 2010 08:43:51 +0100 Subject: [PATCH] ocaml: Fix Makefile for parallel build. Signed-off-by: Ian Jackson --- tools/ocaml/Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/ocaml/Makefile b/tools/ocaml/Makefile index 73c2988022..2a36e7bc8c 100644 --- a/tools/ocaml/Makefile +++ b/tools/ocaml/Makefile @@ -13,21 +13,24 @@ SUBDIRS = $(SUBDIRS_LIBS) $(SUBDIRS_PROGRAMS) .PHONY: all all: build -.PHONY: build $(SUBDIRS) -build: $(SUBDIRS) - -$(SUBDIRS): - @echo " === building $@" - @$(MAKE) --no-print-directory -C $@ +.PHONY: build +build: SUBDIRS + +.PHONY: SUBDIRS SUBDIRS_PROGRAMS SUBDIRS_LIBS +SUBDIRS SUBDIRS_PROGRAMS SUBDIRS_LIBS: + @set -e; for d in $($@); do \ + echo " === building $$d"; \ + $(MAKE) --no-print-directory -C $$d; \ + done .PHONY: install install-libs install-program install: install-libs install-program -install-program: $(SUBDIRS_PROGRAMS) +install-program: SUBDIRS_PROGRAMS $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) $(INSTALL_PROG) xenstored/oxenstored $(DESTDIR)$(SBINDIR) -install-libs: $(SUBDIRS_LIBS) +install-libs: SUBDIRS_LIBS .PHONY: clean clean: -- 2.30.2